import 'package:flutter_test/flutter_test.dart';
import 'package:media_kit_video/media_kit_video.dart';
import 'package:media_kit_video/media_kit_video_platform_interface.dart';
import 'package:media_kit_video/media_kit_video_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockMediaKitVideoPlatform
    with MockPlatformInterfaceMixin
    implements MediaKitVideoPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final MediaKitVideoPlatform initialPlatform = MediaKitVideoPlatform.instance;

  test('$MethodChannelMediaKitVideo is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelMediaKitVideo>());
  });

  test('getPlatformVersion', () async {
    MediaKitVideo mediaKitVideoPlugin = MediaKitVideo();
    MockMediaKitVideoPlatform fakePlatform = MockMediaKitVideoPlatform();
    MediaKitVideoPlatform.instance = fakePlatform;

    expect(await mediaKitVideoPlugin.getPlatformVersion(), '42');
  });
}
